<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>分配储位</title>
    <script th:src="@{/js/jquery.min.js}"></script>
</head>
<script>
    function submit() {
        var taskNo = $("#taskNo").val();
        if (taskNo == "") {
            alert("任务号不能为空")
            return;
        }
        var rkkx1 = $("#rkkx1").val();
        if (rkkx1 == "") {
            alert("巷道口1空闲状态不能为空")
            return;
        }
        var rkkx2 = $("#rkkx2").val();
        if (rkkx2 == "") {
            alert("巷道口2空闲状态不能为空")
            return;
        }
        var rkkx3 = $("#rkkx3").val();
        if (rkkx3 == "") {
            alert("巷道口3空闲状态不能为空")
            return;
        }
        var rkkx4 = $("#rkkx4").val();
        if (rkkx4 == "") {
            alert("巷道口4空闲状态不能为空")
            return;
        }
        var ddj1curp = $("#ddj1curp").val();
        if (ddj1curp == "") {
            alert("堆垛机1当前位置")
            return;
        }
        var ddj2curp = $("#ddj2curp").val();
        if (ddj2curp == "") {
            alert("堆垛机2当前位置")
            return;
        }
        var idParam = {};
        idParam.taskNo = taskNo;
        idParam.rkkx1 = rkkx1;
        idParam.rkkx2 = rkkx2;
        idParam.rkkx3=rkkx3;

        $.ajax({
            "url": "/test/allocate?trayCode",
            "type": "POST",
            "data":idParam,
            "dataType": "json",
            "success": function (result) {
                console.log(result);
                alert(result.msg);



            }
        });

    }
</script>
<body>
<label>任务号：</label>
<input type="test" id="taskNo"><br>

<label>提升机口1空闲状态：</label>
<input type="text" id="rkkx1"><br>

<label>提升机口2空闲状态：</label>
<input type="text" id="rkkx2"><br>

<label>提升机口3空闲状态：</label>
<input type="text" id="rkkx3"><br>


<button onclick="submit()">提交</button>
</body>


</html>